Automation

Downie can be used in various automated workflows as well. This help topic will cover this.

Automated Mode

From time to time, Downie needs to show you some kind of a prompt (login dialog, subtitle selection, etc.). If you are away from the machine, this can be unwanted as it blocks the UI and processing of the links in the background. For this, there is the “automated mode” which can be enabled in Preferences > Advanced. When run in automated mode, Downie will suppress all dialogs. Please keep in mind that this has its risks - e.g. if Downie requires you to login, it will cancel the attempt automatically and the download will fail.

The main question now is how to open a link in Downie. There are several options.

If you just need to open a link in Downie, then it’s simple - if you are using a shell (command line), use the open command:

open -a 'Downie 4' 'https://www.example.com/'

Several notes:

If you are using Apple Script, use the open command:

tell application "Downie 4"
	open location "https://www.example.com/"
end tell

In Automator, you can use the Open URLs in Downie Automator action.

Sometimes, you want some links to be opened with particular postprocessing, or even in the User-Guided Extraction. For this, Downie uses a custom scheme downie://. Here is an example:

downie://XUOpenURL?url=https://www.example.com/&postprocessing=audio

Let’s break this down. The first part downie://XUOpenURL is fixed. After that, there is the query separator (?) and regular URL query parameters. In URLs, query parameters are separated by & and are in format name=value. In this case, there are two parameters - url (whose value is https://www.example.com/) and postprocessing whose value is audio.

There are several supported parameters:

Once you have this custom link, the workflow is the same - either use the open -a 'Downie 4' 'downie://...' shell command or use the same with Apple Script.